package com.flyduck.vueshop.product.h5.service.impl;

import com.flyduck.vueshop.common.core.utils.BeanUtils;
import com.flyduck.vueshop.product.entity.AppCategory;
import com.flyduck.vueshop.product.h5.service.H5CategoryService;
import com.flyduck.vueshop.product.h5.vo.H5CategoryDetailsRespVO;
import com.flyduck.vueshop.product.mapper.AppCategoryMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @program: vueshop
 * @description:
 * @author: flyduck
 * @create: 2024-06-16 10:13
 **/
@Service
public class H5CategoryServiceImpl implements H5CategoryService {

    @Resource
    private AppCategoryMapper appCategoryMapper;

    @Override
    public H5CategoryDetailsRespVO getCategoryDetailsById(Long id) {
        AppCategory appCategory = appCategoryMapper.selectById(id);
        return BeanUtils.toBean(appCategory, H5CategoryDetailsRespVO.class);
    }
}
